package com.egao.common.publicly.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.egao.common.core.web.PageParam;
import com.egao.common.module.cooperative.constants.CooperativeProjectConstants;
import com.egao.common.module.cooperative.entity.CooperativeProjectActivity;
import com.egao.common.module.cooperative.entity.CooperativeProjectBanner;
import com.egao.common.module.cooperative.entity.vo.CooperativeProjectActivityListVO;
import com.egao.common.module.cooperative.service.CooperativeProjectActivityService;
import com.egao.common.module.cooperative.service.CooperativeProjectBannerService;
import com.egao.common.publicly.service.PubliclyCooperativeProjectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * 产教融合公开接口实现
 *
 * @author root
 */
@Service
public class PubliclyCooperativeProjectServiceImpl implements PubliclyCooperativeProjectService {

    @Autowired
    private CooperativeProjectBannerService cooperativeProjectBannerService;

    @Override
    public List<CooperativeProjectBanner> listAllBanner() {
       return cooperativeProjectBannerService.list(new QueryWrapper<CooperativeProjectBanner>()
                .select("id, title, img, url")
                .eq("state", CooperativeProjectConstants.BANNER_STATE_PUBLIC)
                .orderBy(true, false, "sort IS NULL, sort ASC, create_time")
        );
    }


}
